Extending Traces with OAT: An Object Attribute Trace Package for Tcl/Tk
نویسندگان
چکیده
Tcl supports variable traces, which associate arbitrary scripts with variable reads, writes and unsets. We developed OAT (Object Attribute Traces), a protocol for extending traces to attributes of arbitrary Tcl “objects.” We wrote several OAT-based extensions including TkOAT, which provides traces on attributes of Tk widgets and canvas items. The OAT protocol and derived extensions bring the benefits of more expressive constraints to Tcl/Tk applications by providing extended traces. OAT requires no changes to the Tcl core and is implemented as a loadable library; OAT-based extended trace packages introduce minimal changes to the code of existing extensions (Tk, CMT, etc.). The new version of our formula manager, TclProp, takes advantage of extended traces provided by OAT.
منابع مشابه
Multiple Trace Composition and Its Uses
Traces are code attachments to variables that cause designated blocks of code to be executed on reads or writes to the given variable. Traces have numerous uses, including rules (“on do ” statements), autoloading and initialization based on data access, transparent remote data access, paging and swapping, and persistence. Traces are usually limited to ad-hoc, hard-coded comp...
متن کاملExtending Tcl for Dynamic Object-Oriented Programming
Object Tcl is an extension to the Tool Command Language (Tcl) for the management of complicated data types and dynamic object-oriented programming in general. We believe it is a worthy alternative to other object-oriented programming extensions (including [incr Tcl]) because it may be used dynamically, allows for per object specialization, has an economy of design and implementation, and provid...
متن کاملExtending Tcl-Tk to provide a functional eye and hand for the Soar cognitive modelling architecture
It would extend the world that cognitive models can see if models could interact based on an interface language. We introduce a system designed to allow cognitive models to interact with any display written in Tcl/Tk, a common interface creation language. This approach can be viewed as extending cognitive architectures to include eyes and hands that exist in the world of Tcl/Tk. This system is ...
متن کاملTksh: A Tcl Library for KornShell
This paper describes Tksh, an implementation of the Tcl C library written on top of the library for the new KornShell (ksh93). Tksh emulates the behavior of Tcl by using the API that is provided for extending ksh93, which is similar to the Tcl library in that it allows access to variables, functions and other state of the interpreter. This implementation requires no modi cation to ksh93, and al...
متن کاملThe R-Tcl/Tk interface
The tcltk package allows the use of the Tk graphical user interface elements from within R by embedding Tk commands into the R language. The design considerations are discussed, and also the shortcomings of the current implementation.
متن کامل